package com.p2l.letterblocks;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;

public abstract class Sprite {
	//public static final float BOTTOM = 540 - 150;
	//public static final float RIGHT = 800 - 50;
	public int TYPE = 0;
	
	private float x, y;
	private Vector vector;
	private Bitmap bitmap;
	private Paint p;
	private float height, width;

	
	public Sprite() {
		this(50f, 50f, Color.BLACK);
	}
	
	public Sprite(float x, float y, int color) {
		this.x = x;
		this.y = y;
		vector = new Vector(0f, 0f);
		p = new Paint();
		p.setColor(color);
	}
	
	public Sprite(float x, float y, Bitmap b) {
		this.x = x;
		this.y = y;
		this.bitmap = b;
		vector = new Vector(0f, 0f);
		p = new Paint();
		p.setDither(true);
	}
	
	public Sprite(float x, float y, float height, float width, Bitmap b) {
		this.x = x;
		this.y = y;
		this.height = height;
		this.width = width;
		this.bitmap = b;
		vector = new Vector(0f, 0f);
		p = new Paint();
		p.setDither(true);
	}

	public float getX() {
		return x;
	}

	public void setX(float x) {
		this.x = x;
	}

	public float getY() {
		return y;
	}

	public void setY(float y) {
		this.y = y;
	}

	public float getHeight() {
		return GamePersistor.SCREEN_HEIGHT / 100f * height;
	}

	public void setHeight(float height) {
		this.height = height;
	}

	public float getWidth() {
		return GamePersistor.SCREEN_WIDTH / 100f * width;
	}

	public void setWidth(float width) {
		this.width = width;
	}

	public Vector getVector() {
		return vector;
	}

	public void setVector(Vector vector) {
		this.vector = vector;
	}
	
	public Paint getPaint() {
		return p;
	}

	public Bitmap getBitmap() {
		return bitmap;
	}

	public void setBitmap(Bitmap bitmap) {
		this.bitmap = bitmap;
	}

	public abstract void onDraw(Canvas c, int delta, float x);
}